<?php 
/* SVN FILE: $Id$ */
/* Poll Test cases generated on: 2009-10-31 15:34:13 : 1257014053*/
App::import('Model', 'Polls.Poll');

class PollTestCase extends CakeTestCase {
	var $Poll = null;
	var $fixtures = array('plugin.polls.poll', 'plugin.polls.poll_option', 'plugin.polls.poll_option');

	function startTest() {
		$this->Poll =& ClassRegistry::init('Poll');
	}

	function testPollInstance() {
		$this->assertTrue(is_a($this->Poll, 'Poll'));
	}

	function testPollFind() {
		$this->Poll->recursive = -1;
		$results = $this->Poll->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Poll' => array(
			'id'  => 1,
			'title'  => 'Lorem ipsum dolor sit amet',
			'activo'  => 1,
			'created'  => '2009-10-31'
		));
		$this->assertEqual($results, $expected);
	}
}
?>